From: Florian Müllner Date: Fri, 16 Feb 2024 23:07:36 +0000 (+0100) Subject: modalDialog: Remove timestamp parameter from open() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~1^2~158 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3f72a04a1b9a1f0eb25a02095d3556b34e855881;p=gnome-shell.git modalDialog: Remove timestamp parameter from open() It is now unused. Part-of: --- diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js index 9a8e98d34..ab9b86083 100644 --- a/js/ui/components/networkAgent.js +++ b/js/ui/components/networkAgent.js @@ -648,7 +648,7 @@ class VPNRequestHandler extends Signals.EventEmitter { if (contentOverride && contentOverride.secrets.length) { // Only show the dialog if we actually have something to ask this._shellDialog = new NetworkSecretDialog(this._agent, this._requestId, this._connection, 'vpn', [], this._flags, contentOverride); - this._shellDialog.open(global.get_current_time()); + this._shellDialog.open(); } else { this._agent.respond(this._requestId, Shell.NetworkAgentResponse.CONFIRMED); this.destroy(); @@ -818,7 +818,7 @@ class NetworkAgent { delete this._dialogs[requestId]; }); this._dialogs[requestId] = dialog; - dialog.open(global.get_current_time()); + dialog.open(); } _cancelRequest(agent, requestId) { diff --git a/js/ui/components/polkitAgent.js b/js/ui/components/polkitAgent.js index 18e817e22..34cd34c0c 100644 --- a/js/ui/components/polkitAgent.js +++ b/js/ui/components/polkitAgent.js @@ -193,7 +193,7 @@ const AuthenticationDialog = GObject.registerClass({ _ensureOpen() { // NOTE: ModalDialog.open() is safe to call if the dialog is // already open - it just returns true without side-effects - if (!this.open(global.get_current_time())) { + if (!this.open()) { // This can fail if e.g. unable to get input grab // // In an ideal world this wouldn't happen (because the diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js index 6f5aadd7c..15bfc6f9e 100644 --- a/js/ui/endSessionDialog.js +++ b/js/ui/endSessionDialog.js @@ -708,7 +708,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog { } async OpenAsync(parameters, invocation) { - let [type, timestamp, totalSecondsToStayOpen, inhibitorObjectPaths] = parameters; + let [type, timestamp_, totalSecondsToStayOpen, inhibitorObjectPaths] = parameters; this._totalSecondsToStayOpen = totalSecondsToStayOpen; this._type = type; @@ -774,7 +774,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog { this._updateButtons(); - if (!this.open(timestamp)) { + if (!this.open()) { invocation.return_error_literal( ModalDialogError.GRAB_FAILED, 'Cannot grab pointer and keyboard'); diff --git a/js/ui/extensionDownloader.js b/js/ui/extensionDownloader.js index 33f168ce6..0366c5dfa 100644 --- a/js/ui/extensionDownloader.js +++ b/js/ui/extensionDownloader.js @@ -66,7 +66,7 @@ export async function installExtension(uuid, invocation) { } const dialog = new InstallExtensionDialog(uuid, info, invocation); - dialog.open(global.get_current_time()); + dialog.open(); } /** diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js index cab7f85c0..34cda9364 100644 --- a/js/ui/modalDialog.js +++ b/js/ui/modalDialog.js @@ -171,7 +171,7 @@ export const ModalDialog = GObject.registerClass({ () => (this._initialKeyFocus = null), this); } - open(_timestamp) { + open() { if (this.state === State.OPENED || this.state === State.OPENING) return true;